<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of ClockGroup
 *
 * @author BUI VAN UY
 */
class ClockGroup
{

    public function __construct()
    {
        
    }

    /**
     * Group
     * @var Group
     */
    public $name = NULL;

    /**
     *  List Staff
     * @var array
     */
    public $staffs     = array();
    private $totalTime = NULL;

    public function getTotalTime()
    {
        if ($this->totalTime != NULL)
            return $this->totalTime;
        foreach ($this->staffs as $staff)
        {
            $this->totalTime += $staff->clockDay->getTotalTime();
        }
        return $this->totalTime;
    }

}

?>
